Data processing method, electronic device, and computer-readable storage medium

ABSTRACT

The present disclosure provides a data processing method, an electronic device and a computer-readable storage medium. The method includes: acquiring first image data of images stored in a local device and second image data of images stored in another device; comparing the first image data with the second image data to determine a storage type of an image contained in the first image data and/or contained in the second image data; establishing a mapping relation between a first face group contained in the first image data and a second face group contained in the second image data according to the storage type; and processing the first image data and the second image data for the first face group and the second face group having the mapping relation with each other.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority of Chinese PatentApplication No. 201810032305.9, filed on Jan. 12, 2018, the entirecontents of which are incorporated herein by reference.

FIELD

The present disclosure relates to a computer technology field, and moreparticularly to a data processing method, an electronic device, and acomputer-readable storage medium.

BACKGROUND

With popularization of electronic devices and rapid development ofmobile internet, more and more users begin to use the electronicdevices. An album function has become a common application of theelectronic device, which is used frequently by the user. An album of theelectronic device typically stores a large number of images. Image datamay be synchronized in different electronic devices. However, in therelated art, when data synchronization is performed, image data in oneelectronic device is configured as reference to clear or cover imagedata in other electronic devices, which may cause data lost, inaccuratedata synchronization or the like, such that an effect of image datasynchronization is poor.

DISCLOSURE

Embodiments of the present disclosure provide a data processing methodan electronic device, and a computer-readable storage medium.

The data processing method includes: acquiring first image data ofimages stored in a local device and second image data of images storedin another device; comparing the first image data with the second imagedata to determine a storage type of an image contained in the firstimage data and/or contained in the second image data, the storage typeincluding at least one of: both storing in the local device and storingin the another device, only storing in the local device, and onlystoring in the another device; establishing a mapping relation between afirst face group contained in the first image data and a second facegroup contained in the second image data according to the storage type;and processing the first image data and the second image data accordingto the mapping relation with regard to the first face group and thesecond face group having the mapping relation with each other.

The electronic device includes a memory and a processor. The memory isconfigured to store computer programs that, when executed by theprocessor, cause the processor to implement the aforementioned dataprocessing method.

The computer-readable storage medium stores with computer programs that,when executed by a processor, cause the processor to implement theaforementioned data processing method.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an application scene of a dataprocessing method according to embodiments of the present disclosure.

FIG. 2 is a block diagram of an electronic device according to anembodiment of the present disclosure.

FIG. 3 is a flow chart of a data processing method according to anembodiment of the present disclosure.

FIG. 4 is a flow chart illustrating a process of establishing a mappingrelation between a second face group and a first face group according toan embodiment of the present disclosure.

FIG. 5 is a flow chart illustrating a process of establishing a mappingrelation between a second face group and a first face group according toanother embodiment of the present disclosure.

FIG. 6 is a block diagram of a data processing device according to anembodiment of the present disclosure.

FIG. 7 is a block diagram of a mapping relation establishing moduleaccording to an embodiment of the present disclosure.

FIG. 8 is a block diagram of an electronic device according to anotherembodiment of the present disclosure.

EMBODIMENTS OF THE PRESENT DISCLOSURE

In order to more clearly explain objectives, technical solutions andadvantages of the present disclosure, the present disclosure will bedescribed below with reference to the accompanying drawings and theembodiments of the present disclosure. The embodiments described hereinwith reference to drawings are explanatory, illustrative, and used togenerally understand the present disclosure. The embodiments shall notbe construed to limit the present disclosure.

In the specification, it is to be understood that terms such as “first”and “second” are used herein for describing various elements, theseelements should not be limited by these terms. These terms are only usedfor distinguishing one element from another element. For example, afirst client may also be called a second client, and similarly, thesecond client may also be called the first client, without departingfrom the scope of the present disclosure. The first client and thesecond client are both a client, but are not the same client.

FIG. 1 is a schematic diagram of an application scene of a dataprocessing method according to embodiments of the present disclosure. Asillustrated in FIG. 1, image data synchronization can be realizedbetween an electronic device 10 (which may be considered as a localdevice) and another device 20 (which may be an external device). Theanother device 20 may be an electronic device, such as a server, aserver cluster, or a mobile terminal. The electronic device 10 mayacquire first image data of images stored in the electronic device andreceive second image data of images from the another device 20. Theelectronic device 10 may compare the first image data with the secondimage data to determine a storage type of an image contained in thefirst image data and/or contained in the second image data. The storagetype may include at least one of: both storing in the local device andstoring in the another device 20, only storing in the local device, andonly storing in the another device 20. The electronic device 10 mayestablish a mapping relation between a second face group contained inthe second image data and a first face group contained in the firstimage data according to the storage type and merge the first image datacontaining the first face group and the second image data containing thesecond face group having the mapping relation with the first face groupfor the second face group and the first face group having the mappingrelation with each other.

FIG. 2 is a block diagram of an electronic device according to anembodiment of the present disclosure. As illustrated in FIG. 2, theelectronic device includes a processor, a storage, a network interface,a display screen and an input device coupled via a system bus. Thestorage may include a non-volatile storage medium and a memory. Thenon-volatile storage medium of the electronic device stores an operatingsystem and computer programs. The computer programs are executed by theprocessor to implement the data processing method according to anembodiment of the present disclosure. The processor is configured toprovide calculation and control capacity for supporting operations ofthe entire electronic device. The memory in the electronic device isconfigured to provide running environment for the computer programs inthe non-volatile storage medium. The network interface of the electronicdevice is configured to perform data transmission with other electronicdevices (for example, a server, a mobile terminal etc.). The displayscreen of the electronic device may be a liquid crystal display screenor E-ink display screen. The input device may be a touch layer coveringthe display screen or a key, a trackball or a touch panel disposed on ashell of the electronic device, or may be an external keyboard, anexternal touch panel or a mouse etc. The electronic device may be amobile terminal, such as a phone, a tablet personal computer, a personaldigital assistant or a wearable device, or may be a server. It can beunderstood that, the structure in FIG. 2 merely illustrates a blockdiagram of a partial structure related to the technical solutions of thepresent disclosure, which shall not constitute limitation to theelectronic device in which the technical solution of the presentdisclosure is applicable. The electronic device may include more or lessthan components illustrated, or may combine some components, or mayarrange the components in different ways.

As illustrated in FIG. 3, in one embodiment, a data processing method isprovided. The method includes the followings.

At block 310, first image data of images stored in a local device andsecond image data of images stored in another device are acquired.

The electronic device may receive image data synchronized from anotherdevice. The another device may be a server or a server cluster, or maybe a terminal, for example a smart phone, a tablet personal computer orother electronic devices. The electronic device may acquire the firstimage data stored in the electronic device and receive the second imagedata stored in the another device from the another device. The firstimage data stored in the electronic device refers to image data storedin the electronic device before the electronic device receives the imagedata synchronized from the another device.

The first image data may include first image information of an imagestored in the electronic device, first face data contained in the imagestored in the electronic device and first face groups corresponding tofaces contained in the first face data. The first image information mayinclude but be not limited to an image identification, a first storagepath or the like. The image identification may be formed by one or moreof numbers, characters and letters. The image identification may be amultimedia number, a name of the image. The first face data contained inthe image stored in the electronic device refers to a face recognitionresult acquired by performing face recognition on the image stored inthe electronic device. The first face data may include but be notlimited to a face number, a face size, a face feature or the like. Thefirst face group may refer to face group data stored in the electronicdevice. The face group data may include but be not limited to a groupnumber, a creating time, or corresponding face data of each first facegroup. After the face recognition is performed on images, the images canbe clustered according to face features acquired by the facerecognition. A face recognized from an image and a face groupcorresponding to the face can be determined according to a clusteringresult, and the image can be added to the corresponding face group.

The second image data may include second image information of an imagestored in the another device which may participate in datasynchronization, second face data contained in the image stored in theanother device and second face groups corresponding to faces containedin the second face data. The second image information may include but benot limited to an image identification, a second storage path or thelike. The second face data contained in the image stored in the anotherdevice refers to a face recognition result acquired by performing facerecognition on the image stored in the another device which mayparticipate in the data synchronization. The second face data mayinclude but be not limited to a face number, a face size, a face featureor the like. The second face group may refer to face group data storedin the another device which may participate in the data synchronization.The face group data may include but be not limited to a group number, acreating time, or face data corresponding of each second face group.

At block 320, the first image data and the second image data arecompared to determine a storage type of an image contained in the firstimage data and/or contained in the second image data.

The electronic device may compare the first image data stored in theelectronic device with the second image data received from the anotherdevice to classify the images stored in the electronic device and/or theimages stored in the another device and to determine the storage type ofeach of the images. The storage type may include at least one of: bothstoring in the local device and storing in the another device, onlystoring in the local device, and only storing in the another device. Animage both storing in the local device and storing in the another devicerefers to that the image is stored in the local device and stored in theanother device which may participate in the data synchronization. Animage only storing in the local device refers to that the image is onlystored in the local device but not stored in the another device. Animage only storing in the another device refers to that the image isonly stored in the another device but not stored in the local device.The storage type of the image may be one of both storing in the localdevice and storing in the another device, only storing in the localdevice, and only storing in the another device.

In an embodiment, the electronic device may determine the storage typesof images by comparing the storage paths of the images. The electronicdevice may compare each first storage path in the first image data witheach second storage path in the second image data and determine astorage type of each image according to a comparison result. After thecomparison, when a second storage path and a first storage path areidentical, it indicates that the image with the identical storage pathis both stored in the local device and stored in the another devicewhich may participate in the data synchronization. The storage type ofthe image is determined as both storing in the local device and storingin the another device. When there is no second storage path the same asa first storage path, it indicates that the image with the first storagepath is only stored in the local device. The storage type of the imageis determined as only storing in the local device. When there is nofirst storage path the same as a second storage path, it indicates thatthe image with the second storage path is only stored in the anotherdevice. The storage type of the image is determined as only storing inthe another device.

In an embodiment, the electronic device may compare message digests ofimages to determine the storage types of the images. The image digest isalso called as digital digest. Each message digest is a value uniquelycorresponding to one message or text and having a fixed length. Themessage digest of an image may be MD5 (Message Digest Algorithm MD5) ofthe image or may be other hash algorithms. The electronic device maycompare each first message digest in the first image data with eachsecond message digest in the second image data to determine the storagetype of each image. When a second message digest and a first messagedigest are identical, it indicates that the images with the identicalmessage digest are the same, such that the image with the identicalmessage digest is stored in the local device and in the another devicewhich may participate in the data synchronization. The storage type ofthe image is determined as both storing in the local device and storingin the another device. When there is no second message digest the sameas a first message digest, the storage type of the image with the firstmessage digest is determined as only storing in the local device. Whenthere is no first message digest the same as a second message digest,the storage type of the image with the second message digest isdetermined as only storing in the another device. In some embodiments,other ways can be used to determine the storage types of the images,which is not limited herein.

At block 330, a mapping relation between a first face group contained inthe first image data and a second face group contained in the secondimage data is established according to the storage type.

The electronic device may establish the mapping relation between thesecond face group contained in the second image data and the first facegroup contained in the first image data according to a presetestablishing way corresponding to the storage type of the image.Establishing the mapping relation between the second face group and thefirst face group refers to that the second face group stored in theanother device are mapped to the first face group stored in the localdevice to establish image data sets having the mapping relation witheach other. The first face group and the second face group having themapping relation with each other may be considered as a same face group.

Different storage types correspond to different mapping relationestablishing ways. After the electronic device determines the storagetype of each image, the electronic device may perform the facerecognition and face group mapping on images with the same storage typeaccording to the preset way corresponding to the same storage type. Theelectronic device may perform face matching on faces contained in animage according to the storage type of the image, to determine whetherthe faces contained in the image are both stored in the local device andstored in the another device. The electronic device may determine sameface groups and differential face groups stored in the local device andstored in the another device according to storage of faces. A first facegroup stored in the local device and a second face group stored in theanother device that contain the same face data can be considered as thesame face group. A first face group only stored in the local device, asecond face group only stored in the another device, or a first facegroup and a second face group corresponding to a same face that containdifferent face data can be considered as the differential face group,which may correspond to different mapping relation establishing ways.For example, a new face group may be created in the local device to mapa second face group only stored in the another device, or a mappingrelation between same face groups can be established, however, thepresent disclosure is not limited herein.

In an embodiment, after the electronic device establishes the mappingrelation between the second face group and the first face group, theelectronic device maps the second face group to the first face group andadds mapping tags into the first face group and the second face grouphaving the mapping relation with each other. In an embodiment, themapping relation between the first face group and the second face groupmay be a Map set. A tag “value” can be set for the first face group anda tag “key” can be set for the second face group. One key may be mappedto one value.

The group numbers of face groups in different electronic devices may bedifferent. For example, a group number of a face group corresponding toface A stored in the local device may be 001, and a group number of aface group corresponding to the face A stored in the another device maybe 100. When the face group stored in the local device and the facegroup stored in the another device are merged directly, the image offace A may be distributed to different face groups, such that thesynchronized image data may be inaccurate. In an embodiment, afterdetermining the storage type of each image, the electronic device mayestablish the mapping relation between the second face group stored inthe another device and the first face group stored in the local deviceaccording to an establishing way corresponding to the storage type. Forexample, the mapping relation between the face group with the groupnumber 100 stored in the another device and the face group with thegroup number 001 stored in the local device can be established to mapthe face group with the group number 100 stored in the another device tothe face group with the group number 001 stored in the local device,such that the synchronized image data can be merged and classifiedaccurately.

At block 340, for the first face group and the second face group havingthe mapping relation with each other, the first image data containingthe first face group and the second image data containing the secondface group are merged.

After the electronic device establishes the mapping relation between thesecond face group and the first face group, for the first face group andthe second face group having the mapping relation with each other, thefirst image data containing the first face group and the second imagedata containing the second face group are merged, such that the imagedata corresponding to the first face group and the second face grouphaving the mapping relation with each other can be merged. Theelectronic device may merge the first image information and the firstface data corresponding to the first face group with the second imageinformation and the second face data corresponding to the second facegroup having the mapping relation with the first face group. Theelectronic device may transfer the second face group stored in theanother device to the first face group stored in the local device. Whenthe user browses the images in the electronic device, the electronicdevice may display the image data synchronized from the another deviceaccurately according to the mapping relation, i.e., displaying theimages corresponding to the first face group and the second face grouphaving the mapping relation with each other in a same album. By mergingthe data according to the mapping relation, a compatibility of the facegroup stored in the another device may be realized without changing thegroup number of the first face group stored in the local device.

In the embodiment, the first image data of the images stored in thelocal device is compared with the second image data of the images storedin the another device to determine the storage type of the imagecontained in the first image data and/or contained in the second imagedata, the mapping relation between the second face group contained inthe second image data and the first face group contained in the firstimage data can be established according to the storage type, and thefirst image data and the second image data are merged for the first facegroup and the second face group having the mapping relation with eachother. In this way, not only the face group stored in the local devicecan be reserved but also the image data synchronized from the anotherdevice may be merged accurately, such that the effect of image datasynchronization can be improved.

As illustrated in FIG. 4, in an embodiment, block 330 of establishingthe mapping relation between the first face group contained in the firstimage data and second face group contained in the second image dataaccording to the storage types of the images includes the followings.

At block 402, when an image has the storage type of both storing in thelocal device and storing in the another device, the first face data ofthe image is matched with the second face data of the image.

The electronic device may establish the mapping relation between thefirst face group and the second face group according to the storagetype. When the storage type of an image is the storage type of bothstoring in the local device and storing in the another device, the firstface data of the image is matched with the second face data of theimage. The first face data may record a face recognition result of theimage stored in the local device. The second face data may record a facerecognition result of the image stored in the another device. Each facecontained in the first face data is matched with each face contained inthe second face data, if a face contained in the first face data matchesa face contained in the second face data, it indicates that they are thesame face.

For example, the first face data of an image includes face 1, face 2 andface 3. The second face data of the image includes face a, face b andface c. the electronic device may match the face 1, the face 2 and theface 3 of the first face data with the face a, the face b and the face cof the second face data respectively. The electronic device may analyzeface features of two faces to calculate a similarity of the two facesaccording to the face features of the two faces. When the similarity isgreater than a predetermined threshold, the electronic device maydetermine that the two faces are matched with each other and thusdetermine that the two faces are the same face. When the face 1 matchesthe face a, the face 2 matches the face b and the face 3 matches theface c, it may be determined that the face 1 and the face a are the sameface, the face 2 and the face b are the same face, and the face 3 andthe face c are the same face.

At block 404, when the second face data of the image and the first facedata of the image contain a same face, a first face group correspondingto the same face is mapped to a second face group corresponding to thesame face.

When the electronic device determines that the second face data and thefirst face data of the image contain the same face, the second facegroup corresponding to the same face may be mapped to the first facegroup corresponding to the same face. For example, when the face 1 ofthe image stored in the local device and the face a of the image storedin the another device are the same face, the face a belongs to thesecond face group with the group number 100 stored in the another deviceand the face 1 belongs to the first face group with the group number 001stored in the local device, the second face group with the group number100 stored in the another device may be mapped to the first face groupwith the group number 001 stored in the local device.

When the electronic device determines that the second face data and thefirst face data of the image contain the same face, the electronicdevice may detect whether the first face group corresponding to the sameface has a mapping relation. The electronic device may determine whethera second face group is mapped to the first face group corresponding tothe same face. When the first face group corresponding to the same facehas no mapping relation, the electronic device may establish the mappingrelation between the second face group corresponding to the same faceand the first face group corresponding to the same face, to map thesecond face group corresponding to the same face to the first face groupcorresponding to the same face. When the first face group correspondingto the same face has the mapping relation, the electronic device maydetermine whether the second face group having the mapping relation withthe first face group corresponding to the same face is consistent withthe second face group corresponding to the same face. When the secondface group having the mapping relation with the first face groupcorresponding to the same face is consistent with the second face groupcorresponding to the same face, the mapping relation is maintained. Whenthe second face group having the mapping relation with the first facegroup corresponding to the same face is inconsistent with the secondface group corresponding to the same face, the electronic device maycreate a new face group in the local device and establish the mappingrelation between the new face group with the second face groupcorresponding to the same face. In an embodiment, the electronic devicemay acquire a maximum group number stored in the local device andgenerate a new group number by adding 1 to the maximum group number, soas to create the new face group in the local device and map the secondface group corresponding to the same face to the new face group.However, other ways can be used to create the new face group, i.e., theface group creating way is not limited in the present disclosure.

When the first face group corresponding to the same face has the mappingrelation and the second face group having the mapping relation with thefirst face group corresponding to the same face is inconsistent with thefirst face group corresponding to the same face, it indicates differentface recognition results are acquired from the another and the localdevice. By directly mapping the second face group corresponding to thesame face to the new face group created in the local device, the facerecognition result different from that in the another device may bestored in the local device without updating a large amount of data, suchthat data merging can be realized after data synchronization.

For example, after the electronic device performs face data matching,the face 1 of the image stored in the local device and the face a of theimage stored in the another device are the same face, the face a belongsto the second face group with the group number 100 stored in the anotherdevice, and the face 1 belongs to the first face group with the groupnumber 001 stored in the local device. The electronic device may detectwhether the first face group with the group number 001 stored in thelocal device has the mapping relation, if not, the mapping relationbetween the second face group with the group number 100 stored in theanother device and the first face group with the group number 001 storedin the local device can be established. When the first face group withthe group number 001 stored in the local device has the mapping relationand the second face group having the mapping relation with the firstface group with the group number 0011 stored in the local device is thesecond face group with the group number 100 stored in the anotherdevice, which is the second face group containing face a stored in theanother device, the mapping relation can be maintained, i.e., themapping relation is kept unchanged. When the second face group havingthe mapping relation with the first face group with the group number0011 stored in the local device is the second face group with the groupnumber 98 stored in the another device, which is inconsistent with thesecond face group containing face a stored in the another device, theelectronic device may create a new face group with the group number 034in the local device and establish the mapping relation between thesecond face group with the group number 100 stored in the another deviceand the first face group with the group number 034 stored in the localdevice.

In embodiments of the present disclosure, the second face groupcorresponding to the same face may be mapped to the first face groupcorresponding to the same face, such that the face group stored in theanother device may be merged while reserving the face group stored inthe local device. Therefore, data synchronization and merging for imagedata from multiple devices can be realized.

As illustrated in FIG. 5, in an embodiment, block 330 of establishingthe mapping relation between the first face group contained in the firstimage data and second face group contained in the second image dataaccording to the storage types of the images further includes thefollowings.

At block 502, it is determined whether the second face groupcorresponding to the face contained in the second face data not matchingany face contained in the first face data has the mapping relation, ifyes, an act at block 504 is executed, it no, an act at block 506 isexecuted.

The electronic device matches the first image data with the second imagedata of the image. When the face contained in the second face data doesnot match any face contained in the first face data, it may bedetermined that the face is additionally recognized in the anotherdevice which may participate in the data synchronization. The electronicdevice may determine whether the second face group corresponding to theface additionally recognized in the another device has a mappingrelation, if yes, the mapping relation can be maintained.

At block 504, the mapping relation is maintained.

At block 506, a new face group is created in the local device and amapping relation between the second face group corresponding to the facenot matching any face in the first face data and the new face group isestablished.

If the second face group corresponding to the face additionallyrecognized in the another device has no mapping relation, the electronicdevice may create the new face group in the local device and establishthe mapping relation between the second face group corresponding to theface additionally recognized in the another device and the new facegroup, so as to map the second face group corresponding to the faceadditionally recognized in the another device to the new face group.

For example, when the first image data of the image stored in the localdevice includes face 1, while the second image data of the image storedin the another device includes face a and face b, if the face 1 matchesthe face a, i.e., the face 1 and the face a are the same face, but theface b does not match any face in the first face data, the electronicdevice may determine that the face b is additionally recognized in theanother device. If the face b belongs to the second face group with thegroup number 063 stored in the another device and the second face grouphas no mapping relation, the electronic device may create the new facegroup with the group number 043 in the local device and establish themapping relation between the second face group with the group number 063stored in the another device and the new face group with the groupnumber 043 stored in the local device.

In an embodiment, the electronic device matches with the first imagedata with the second image data of the image, when a face contained inthe first face data of the image does not match any face contained inthe second face data, it may be determined that the face is additionallyrecognized in the local device, and the electronic device may reservethe first face group corresponding to the face not matching any face inthe second face data.

In an embodiment, the different face recognition results acquired fromthe local device and from the another device may be merged accuratelyaccording to the mapping relation, such that the face group stored inthe another device may be merged while reserving the face group storedin the local device, thus improving the effect of image datasynchronization.

In an embodiment, block 330 of establishing the mapping relation betweenthe first face group contained in the first image data and second facegroup contained in the second image data according to the storage typesof the images includes: when an image has the storage type of onlystoring in the another device, determining whether a second face groupcorresponding to a face contained in the second face data of the imagehas a mapping relation, if yes, maintaining the mapping relation; whenthe second face group corresponding to the face contained in the secondface data of the image has the mapping relation, maintaining the mappingrelation; and when the second face group corresponding to the facecontained in the second face data of the image has no mapping relation,creating a new face group in the local device and establishing a mappingrelation between the second face group corresponding to the facecontained in the second face data of the image and the new face group.

When the storage type of the image is the storage type of only storingin the another device, each face contained in the second face data ofthe image can be considered as the image additionally recognized in theanother device. The electronic device may determine whether the secondface group corresponding to the face contained in the second face groupof the image has a mapping relation. When the second face groupcorresponding to the face contained in the second face group of theimage has the mapping relation, the mapping relation can be maintained.When the second face group corresponding to the face contained in thesecond face group of the image has no mapping relation, the electronicdevice may create the new face group in the local device and establishthe mapping relation between the second face group corresponding to theface contained in the second face group of the image and the new facegroup, so as to map the second face group corresponding to the facecontained in the second face group of the image to the new face group.

For example, when the storage type of the image is the storage type ofonly storing in the another device, the second face data of the imageincludes face x and face y, the face x belongs to the second face groupwith the group number 070 stored in the another device, the face ybelongs to the second face group with the group number 071 stored in theanother device. The second face group with the group number 070 storedin the another device has the mapping relation with the first face groupwith the group number 012 stored in the local device, the electronicdevice may maintain the mapping relation. The second face group with thegroup number 071 stored in the another device has no mapping relation,the electronic device may create the new face group with the groupnumber 037 in the local device and establish the mapping relationbetween the second face group with the group number 071 stored in theanother device and the first face group with the group number 037 storedin the local device.

In an embodiment, when the storage type of the image is the storage typeof only storing in the local device, each face contained in the firstface data of the image can be considered as the image additionallyrecognized in the local device. The electronic device may reserve thefirst face group corresponding to the face contained in the first facedata of the image.

In the embodiment, the different image data stored in the local deviceand from the another device may be merged accurately according to themapping relation, such that the face group stored in the another devicemay be synchronized and merged accurately while reserving the face groupstored in the local device, thus improving the effect of image datasynchronization.

In an embodiment, a data processing method is provided including:operation (1), acquiring first image data of images stored in the localdevice and second image data of images stored in an external device;operation (2), comparing the first image data with the second image datato determine a storage type of an image contained in the first imagedata and/or contained in the second image data, the storage typeincluding at least one of: both storing in the local device and storingin the another device, only storing in the local device, and onlystoring in the another device; operation (3), establishing a mappingrelation between a first face group contained in the first image dataand a second face group contained in the second image data according tothe storage type; and operation (4), processing the first image data andthe second image data for the first face group and the second face groupwith the mapping relation with each other.

In an embodiment, comparing the first image data with the second imagedata to determine the storage type of the image contained in the firstimage data includes: comparing a first storage path of the imagecontained in the first image data with each second storage pathcontained in the second image data; when a second storage path isidentical to the first storage path, determining the storage type of theimage as both storing in the local device and storing in the anotherdevice; when no second storage path is identical to the first storagepath, determining the storage type of the image as only storing in thelocal device.

In an embodiment, comparing the first image data with the second imagedata to determine the storage type of the image contained in the secondimage data includes: comparing each storage path contained in the firstimage data with a second storage path of the image contained in thesecond image data; when a first storage path is identical to the secondstorage path, determining the storage type of the image as both storingin the local device and storing in the another device; and when no firststorage path is identical to the second storage path, determining thestorage type of the image as only storing in the another device.

In an embodiment, the first image data contains first face data of eachimage stored in the local device and the first face group correspondingto a face contained in the first face data. The second image datacontains second face data of each image stored in another device and thesecond face group corresponding to a face contained in the second facedata. Operation (3) includes: when an image has the storage type of bothstoring in the local device and storing in the another device, matchingthe first face data of the image with the second face data of the image;and when the first face data of the image and the second face data ofthe image contain a same face, mapping a second face group correspondingto the same face to a first face group corresponding to the same face.

In an embodiment, mapping the second face group corresponding to thesame face to the first face group corresponding to the same faceincludes: detecting whether the first face group corresponding to thesame face has a mapping relation; and in response to detecting that thefirst face group corresponding to the same face has no mapping relation,establishing a mapping relation between the first face groupcorresponding to the same face and the second face group correspondingto the same face.

In an embodiment, operation (3) further includes: in response todetecting that the first face group corresponding to the same face hasthe mapping relation, determining whether a second face group having themapping relation with the first face group corresponding to the sameface is consistent with the second face group corresponding to the sameface; and when the second face group having the mapping relation withthe first face group corresponding to the same face is consistent withthe second face group corresponding to the same face, maintaining themapping relation.

In an embodiment, operation (3) further includes: when the second facegroup having the mapping relation with the first face groupcorresponding to the same face is inconsistent with the second facegroup corresponding to the same face, creating a new face group in thelocal device; and establishing a mapping relation between the secondface group corresponding to the same face and the new face group.

In an embodiment, after matching the first face data of the image withthe second face data of the image, the method further includes: when thesecond face data of the image contains a face not matching any facecontained in the first face data of the image, determining whether asecond face group corresponding to the face not matching any facecontained in the first face data has a mapping relation; when the secondface group corresponding to the face not matching any face contained inthe first face data has the mapping relation, maintaining the mappingrelation; and when the second face group corresponding to the face notmatching any face contained in the first face data has no mappingrelation, creating a new face group in the local device and establishinga mapping relation between the second face group corresponding to theface not matching any face contained in the first face data and the newface group.

In an embodiment, after matching the first face data of the image withthe second face data of the image, the method further includes: when thefirst face data of the image contains a face not matching any facecontained in the second face data of the image, reserving a first facegroup corresponding to the face not matching any face contained in thesecond face data.

In an embodiment, operation (3) includes: when an image has the storagetype of only storing in the another device, determining whether a secondface group corresponding to a face contained in second face data of theimage has a mapping relation; and when the second face groupcorresponding to the face contained in the second face data of the imagehas the mapping relation, maintaining the mapping relation; and when thesecond face group corresponding to the face contained in the second facedata of the image has no mapping relation, creating a new face group inthe local device and establishing a mapping relation between the secondface group corresponding to the face contained in the second face dataof the image and the new face group.

In an embodiment, operation (3) includes: when an image has the storagetype of only storing in the local device, reserving a first face groupcorresponding to a face contained in the first face data of the image.

In the embodiment, the first image data of the images stored in thelocal device is compared with the second image data of the images storedin the another device to determine the storage type of the imagecontained in the first image data and/or contained in the second imagedata, the mapping relation between the second face group contained inthe second image data and the first face group contained in the firstimage data can be established according to the storage type, and thefirst image data and the second image data are merged for the first facegroup and the second face group having the mapping relation with eachother. In this way, not only the face group stored in the local devicecan be reserved but also the image data synchronized from the anotherdevice may be merged accurately, such that the effect of image datasynchronization can be improved.

It should be understood that, although various steps in theaforementioned flow chart are executed in an order according toindication of arrows, those steps are not necessarily executed accordingto the order indicated by the arrows. Unless specified or limitedotherwise, the present disclosure is not limited by the order of thesteps, some steps may be performed in other orders according to presentdisclosure. Moreover, at least part of steps in the above flow chart mayinclude a plurality of sub-steps or a plurality of stages. Thosesub-steps or stages are not necessarily performed simultaneously but canbe executed at different time. Those sub-steps or stages are notnecessarily performed in sequence but can be performed alternatelytogether with at least part of other steps or sub-steps or stages ofother steps.

As illustrated in FIG. 6, in an embodiment, a data processing device 600is provided. The device 600 includes a data acquiring module 610, acomparing module 620, a mapping relation establishing module 630 and aprocessing module 640.

The data acquiring module 610 is configured to acquire first image dataof images stored in the local device and second image data of imagesstored in another device.

The comparing module 620 is configured to compare the first image datawith the second image data to determine a storage type of an imagecontained in the first image data and/or contained in the second imagedata, the storage type including at least one of: both storing in thelocal device and storing in the another device, only storing in thelocal device, and only storing in the another device.

The comparing module 630 includes a comparing unit and a typedetermining unit.

The comparing unit is configured to compare each first storage path inthe first image data with each second storage path in the second imagedata.

The type determining unit is configured to, when a first storage pathand a second storage path are identical, determine a storage type of animage with the identical storage path as both storing in the localdevice and storing in the another device.

The type determining unit is further configured to, when a first storagepath is different from any second storage path, determining a storagetype of an image with the first storage path as only storing in thelocal device.

The type determining unit is further configured to, when a secondstorage path is different from any first storage path, determining astorage type of an image with the second storage path as only storing inthe another device.

The mapping relation establishing module 630 is configured to establisha mapping relation between a first face group contained in the firstimage data and a second face group contained in the second image dataaccording to the storage type.

The processing module 640 is configured to process the first image dataand the second image data for the first face group and the second facegroup having the mapping relation with each other.

In the embodiment, the first image data of the images stored in thelocal device is compared with the second image data of the images storedin the another device to determine the storage type of each of theimages stored in the local device and the images stored in the anotherdevice, the mapping relation between the second face group contained inthe second image data and the first face group contained in the firstimage data can be established according to the storage type, and thefirst image data and the second image data are merged for the first facegroup and the second face group having the mapping relation with eachother. In this way, not only the face group stored in the local devicecan be reserved but also the image data synchronized from the anotherdevice may be merged accurately, such that the effect of image datasynchronization can be improved.

In an embodiment, the first image data contains first face data of eachimage stored in the local device and the first face group correspondingto a face contained in the first face data. The second image datacontains second face data of each image stored in another device and thesecond face group corresponding to a face contained in the second facedata. As illustrated in FIG. 7, the mapping relation establishing module630 includes a matching unit 632 and a mapping unit 634.

The matching unit 632 is configured to, when an image has the storagetype of both storing in the local device and storing in the anotherdevice, match the first face data of the image with the second face dataof the image.

The mapping unit 634 is configured to, when the first face data of theimage and the second face data of the image contain a same face, map asecond face group corresponding to the same face to a first face groupcorresponding to the same face.

In an embodiment, the mapping unit 634 is further configured to: detectwhether the first face group corresponding to the same face has amapping relation; and in response to detecting that the first face groupcorresponding to the same face has no mapping relation, establish amapping relation between the first face group corresponding to the sameface and the second face group corresponding to the same face.

In an embodiment, the mapping unit 634 is further configured to: inresponse to detecting that the first face group corresponding to thesame face has the mapping relation, determine whether a second facegroup having the mapping relation with the first face groupcorresponding to the same face is consistent with the second face groupcorresponding to the same face; and when the second face group havingthe mapping relation with the first face group corresponding to the sameface is consistent with the second face group corresponding to the sameface, maintain the mapping relation.

In an embodiment, the mapping unit 634 is further configured to: whenthe second face group having the mapping relation with the first facegroup corresponding to the same face is inconsistent with the secondface group corresponding to the same face, create a new face group inthe local device; and establish a mapping relation between the secondface group corresponding to the same face and the new face group.

In the embodiment, the second face group corresponding to the same facecan be mapped to the first face group corresponding to the same face,such that the face group stored in the another device can be mergedwhile reserving the face group stored in the local device. Therefore,data synchronization and merging for the image data from multipledevices can be realized accurately.

In an embodiment, the mapping unit 634 is further configured to: whenthe second face data of the image contains a face not matching any facecontained in the first face data of the image, determine whether asecond face group corresponding to the face not matching any facecontained in the first face data has a mapping relation; when the secondface group corresponding to the face not matching any face contained inthe first face data has the mapping relation, maintain the mappingrelation; and when the second face group corresponding to the face notmatching any face contained in the first face data has no mappingrelation, create a new face group in the local device and establish amapping relation between the second face group corresponding to the facenot matching any face contained in the first face data and the new facegroup.

In an embodiment, the mapping unit 634 is further configured to, whenthe first face data of the image contains a face not matching any facecontained in the second face data of the image, reserve a first facegroup corresponding to the face not matching any face contained in thesecond face data.

In the embodiment, different face recognition results stored in thelocal device and stored in the another device can be merged accuratelyaccording to the mapping relation, such that the face group stored inthe another device can be synchronized and mapped while reserving theface group stored in the local device, thus improving the effect ofimage data synchronization.

In an embodiment, the mapping relation establishing module 630 isfurther configured to, when an image has the storage type of onlystoring in the another device, determine whether a second face groupcorresponding to a face contained in second face data of the image has amapping relation; when the second face group corresponding to the facecontained in the second face data of the image has the mapping relation,maintain the mapping relation; and when the second face groupcorresponding to the face contained in the second face data of the imagehas no mapping relation, create a new face group in the local device andestablish a mapping relation between the second face group correspondingto the face contained in the second face data of the image and the newface group.

The mapping relation establishing module 630 is further configured to,when an image has the storage type of only storing in the local device,reserve a first face group corresponding to a face contained in firstface data of the image.

In the embodiment, different image data stored in the local device andstored in the another device can be merged accurately according to themapping relation, such that the face group stored in the another devicecan be synchronized and merged accurately while reserving the face groupstored in the local device, thus improving the effect of image datasynchronization.

Embodiments of the present disclosure also provide an electronic device.As illustrated in FIG. 8, for the convenience of description, only partsrelated to the embodiments of the present disclosure are illustrated.Details that are not disclosed may refer to the method embodiments ofthe present disclosure. The electronic device may be any terminal deviceincluding a mobile phone, a tablet computer, a PDA (personal digitalassistant), a point of sales (POS), a car computer, a wearable deviceand the like. The electronic device being a mobile phone is taken as anexample.

FIG. 8 is a block diagram illustrating a partial structure of a mobilephone related to an electronic device provided by an embodiment of thepresent disclosure. As illustrated FIG. 8, the mobile phone includes: aradio frequency (RF) circuit 810, a memory 820, an input unit 830, adisplay unit 840, a sensor 850, an audio circuit 860, a wirelessfidelity (Wi-Fi) module 870, processor 880, a power supply 890 and othercomponents. It will be understood by those skilled in the art that thestructure of the mobile phone illustrated in FIG. 8 does not constitutea limitation to the mobile phone, and may include more or lesscomponents than those illustrated, or some components may be combined,or the components may be arranged differently.

The RF circuit 810 may be configured to receive and send information orreceive and send signals during calling. After downlink information of astation is received, the downlink information is processed by theprocessor 880. Further, uplink data is sent to the station. Generally,RF circuit 810 includes, but is not limited to, an antenna, at least oneamplifier, a transceiver, a coupler, a low noise amplifier (LNA), aduplexer, and the like. In addition, the RF circuitry 810 may alsocommunicate with the network and other devices via wirelesscommunication. The above wireless communication may use anycommunication standard or protocol, including but not limited to globalsystem of mobile communication (GSM), general packet radio service(GPRS), code division multiple access (CDMA), wide band code divisionmultiple access (WCDMA), Long Term Evolution (LTE), e-mail, shortmessaging service (SMS), and the like.

The memory 820 may be configured to store software programs and modules,and the processor 880 executes various functional applications and dataprocessing of the mobile phone by running software programs and modulesstored in the memory 820. The memory 820 may mainly include a programstorage area and a data storage area, in which the program storage areamay store an operating system, an application program (for example,audio play function, video play function) required by at least onefunction and the like. The data storage area may store data (forexample, audio data, telephone book) created according to usage of themobile phone, and the like. Moreover, the memory 820 may include a highspeed random access memory, and may also include a non-volatile memory,such as at least one magnetic disk storage device, flash memory device,or other volatile solid state storage device.

The input unit 830 may be configured to receive inputted numeric orcharacter information and to generate key signal inputs related to usersettings and function controls of the mobile phone 800. Specifically,the input unit 830 may include a touch panel 832 and other input devices834. The touch panel 832, also called as touch screen, may collect touchoperations of the user performed thereon (for example, the user uses thefinger, a pen or other suitable item or accessory to perform operationson the touch panel 832 or near the touch panel 832) and drivecorresponding connected device according to predetermined procedure. Inan embodiment, the touch panel 832 may include a touch detection deviceand a touch controller. The touch detection device may detect directionand position of a touch operation, detect signal caused by the touchoperation and send the signal to the touch controller. The touchcontroller may receive touch information from the touch detection deviceand transform the touch information to coordinates of touch points andsend the coordinates to the processor 880. Further the touch controllercan receive commands sent from the processor 880 and execute thecommands. Further, the touch panel 832 can be implemented as resistive,capacitive, infrared ray or surface acoustic wave (SAW) form. Besidesthe touch panel 832, the input unit 830 may further include other inputdevices 834. Specifically, other input devices 834 may include, but arenot limited to, one or more of a physical keyboard, a function key (suchas a volume control button, a switch button, etc.), and the like.

The display unit 840 may be configured to display information input bythe user or information provided for the user, and various menus of themobile phone. The display unit 840 may include a displaying panel 842.In an embodiment, the displaying panel 842 may be configured by using aliquid crystal display (LCD), an organic light-emitting diode (OLED), orthe like. In an embodiment, the touch panel 832 may cover the displayingpanel 842. When the touch panel 832 detects a touch operation on thetouch panel or near the touch panel, the touch operation is sent to theprocessor 880 to determine the type of touch event. The processor 880provides corresponding visual output on the displaying panel 842according to the type of the touch event. In FIG. 8, although the touchpanel 832 and the displaying panel 842 may be used as two separatecomponents to realize the input and output function of the mobile phone,in some embodiments, the touch panel 832 and the displaying panel 842may be integrated to realize the input and playing function of themobile phone.

The mobile phone 800 may further include at least one sensor 850, suchas an optical sensor, a motion sensor and other sensors. Specifically,the optical sensor may include an ambient light sensor and a proximitysensor. The ambient light sensor can adjust luminance of the displayingpanel 842 according to brightness of the ambient light. The proximitysensor may switch off the displaying panel 842 and/or backlight when themobile phone is moved to the ear. As one type of motion sensor, anacceleration sensor may detect acceleration values in variousdirections, may detect magnitude and a direction of the gravity when themobile phone is static, and may be applied to an application thatrecognizes the attitude of the mobile phone (for example,landscape/portrait screen), a function related to vibration recognition(such as a pedometer and a knocking), and the like. In addition, themobile phone can be configured with other sensors, such as a gyroscope,a barometer, a hygrometer, a thermometer, and an infrared sensor, whichare not further described herein.

The audio circuit 860, a loudspeaker 862, and a microphone 864 mayprovide audio interfaces between the user and the mobile phone. Theaudio circuit 860 may convert received audio data into an electricalsignal and transmit the electrical signal to the loudspeaker 862. Theloudspeaker 862 converts the electrical signal into a sound signal foroutputting. On the other hand, the microphone 864 converts a collectedsound signal into an electrical signal. The audio circuit 860 receivesthe electrical signal and converts the electrical signal into audiodata, and outputs the audio data to the processor 880 for processing.Then, the processor 880 sends the audio data to, for example, anothermobile terminal by using the RF circuit 810, or outputs the audio datato the memory 820 for further processing.

Wi-Fi is a short distance wireless transmission technology. The mobilephone may help, by using the Wi-Fi module 870, the user to receive andsend e-mails, browse a webpage, access streaming media, and so on. TheWi-Fi module 870 provides wireless broadband Internet access for theuser. Although the Wi-Fi module 870 is illustrated in FIG. 8, it can beunderstood that, the Wi-Fi module 870 is not essential for the mobilephone 800, and may be omitted when required as long as the scope of theessence of the present disclosure is not changed.

The processor 880 is a control center of the mobile phone, which can usevarious interfaces and wires to couple respective parts of the mobilephone, and perform various functions and processing data of the mobilephone by running or executing software programs and/or modules stored inthe memory 820 and calling data stored in the memory 820, so as tomonitor the mobile phone overall. In an embodiment, the processor 880may include one or more processing units. In an embodiment, theprocessor 880 may integrate an application processor and a modemprocessor, in which the application processor is mainly configured toprocess the operating system, the user interface and applications, andthe modem processor is mainly configured to process wirelesscommunication. It could be understood that the above-described modemprocessor may be not integrated in the processor 880. For example, theprocessor 880 may integrate the application processor and a basebandprocessor. The baseband processor and other peripheral chips may formthe modem processor. The mobile phone 800 further includes the powersupply 890 (such as a battery) for supplying power to the components. Inan embodiment, the power supply may be logically coupled with theprocessor 880 by using a power management system, thereby implementingfunctions such as charging, discharging and power consumption managementby using the power management system.

In an embodiment, the mobile phone 800 may further include a camera, aBluetooth module and the like, which are not described herein.

In the embodiment of the present disclosure, the processor 880 includedin the electronic device may implement the aforementioned dataprocessing method when executing the computer programs stored on thememory.

In an embodiment, the electronic device may include a memory 820 and aprocessor 880. The memory 820 stores the computer programs. When thecomputer programs are executed by the processor 880, the processor 880is caused to perform following operations: acquiring first image data ofimages stored in the local device and second image data of images storedin another device; comparing the first image data with the second imagedata to determine a storage type of each an image contained in the firstimage data and/or contained in the second image data, the storage typeincluding at least one of: both storing in the local device and storingin the another device, only storing in the local device, and onlystoring in the another device; establishing a mapping relation between afirst face group contained in the first image data and a second facegroup contained in the second image data according to the storage type;and processing the first image data and the second image data for thefirst face group and the second face group having the mapping relationwith each other.

In an embodiment, a computer-readable storage medium is provided, havingcomputer programs stored thereon. When the computer programs areexecuted by a processor, the processor is caused to implement theaforementioned data processing method.

In an embodiment, a computer program product containing computerprograms is provided. When the computer program product is executed on acomputer device, the computer device is caused to implement theaforementioned data processing method.

It should be understood that all or a part of the method provided by thepresent disclosure may be realized by programs instructing relativehardware, the programs may be stored in a computer-readable memory. Whenthe programs are executed, the flow processes according to the abovemethod embodiments can be implemented. The memory may include a magnetdisk, an optical disk, an ROM, and the like.

Any reference to the memory, the storage, the database, or any othermedium as used herein may include a non-volatile memory and/or avolatile memory. The suitable non-volatile memory may include a ROM, aprogrammable ROM (PROM), an electrically programmable (EPROM), anelectrically erasable programmable ROM (EEPROM) and a flash memory. Thevolatile memory may include a RAM, which is used as an external cache.As illustration and without limitation, RAM may be implemented in mayforms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronic DRAM(SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM),synchlink DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), directmemory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

The various technical features in the above embodiments can be combinedarbitrarily. For ease of description, not all possible combinations ofthe various technical features in the above embodiments are described.However, as long as the technical features are not inconsistent witheach other, the combination of the technical features shall fall withinthe protection scope of the present disclosure.

Above embodiments merely illustrate some implementations of the presentdisclosure, which are described specifically and in detail, but do notconstitute limitation to the scope of the present disclosure. It is tobe noted that, those skilled in the art may make several modificationand change without departing from the concept of the present disclosure,and these modification and change belong to the protection scope of thepresent disclosure. Thus, the protection scope of the present disclosureis defined by appending claims.

What is claimed is:
 1. A data processing method, comprising: acquiringfirst image data of images stored in a local device and second imagedata of images stored in another device; comparing the first image datawith the second image data to determine a storage type of an imagecontained in the first image data and/or contained in the second imagedata, the storage type comprising at least one of: both storing in thelocal device and storing in the another device, only storing in thelocal device, and only storing in the another device; establishing amapping relation between a first face group contained in the first imagedata and a second face group contained in the second image dataaccording to the storage type; and processing the first image data andthe second image data with regard to the first face group and the secondface group having the mapping relation with each other.
 2. The methodaccording to claim 1, wherein the first image data contains first facedata of an image stored in the local device and the first face groupcorresponding to a face contained in the first face data, the secondimage data contains second face data of an image stored in the anotherdevice and the second face group corresponding to a face contained inthe second face data; establishing the mapping relation between thefirst face group contained in the first image data and the second facegroup contained in the second image data according to the storage typecomprises: when the image has the storage type of both storing in thelocal device and storing in the another device, matching the first facedata of the image with the second face data of the image; and when thefirst face data of the image and the second face data of the imagecontain a same face, mapping a second face group corresponding to thesame face to a first face group corresponding to the same face.
 3. Themethod according to claim 2, wherein mapping the second face groupcorresponding to the same face to the first face group corresponding tothe same face comprises: detecting whether the first face groupcorresponding to the same face has a mapping relation; and in responseto detecting that the first face group corresponding to the same facehas no mapping relation, establishing a mapping relation between thefirst face group corresponding to the same face and the second facegroup corresponding to the same face.
 4. The method according to claim3, further comprising: in response to detecting that the first facegroup corresponding to the same face has the mapping relation,determining whether a second face group having the mapping relation withthe first face group corresponding to the same face is consistent withthe second face group corresponding to the same face; and when thesecond face group having the mapping relation with the first face groupcorresponding to the same face is consistent with the second face groupcorresponding to the same face, maintaining the mapping relation.
 5. Themethod according to claim 4, further comprising: when the second facegroup having the mapping relation with the first face groupcorresponding to the same face is inconsistent with the second facegroup corresponding to the same face, creating a new face group in thelocal device; and establishing a mapping relation between the secondface group corresponding to the same face and the new face group.
 6. Themethod according to claim 2, wherein the method further comprises: whenthe second face data of the image contains a face not matching any facecontained in the first face data of the image, determining whether asecond face group corresponding to the face not matching any facecontained in the first face data has a mapping relation; when the secondface group corresponding to the face not matching any face contained inthe first face data has the mapping relation, maintaining the mappingrelation; and when the second face group corresponding to the face notmatching any face contained in the first face data has no mappingrelation, creating a new face group in the local device and establishinga mapping relation between the second face group corresponding to theface not matching any face contained in the first face data and the newface group.
 7. The method according to claim 2, wherein the methodfurther comprises: when the first face data of the image contains a facenot matching any face contained in the second face data of the image,reserving a first face group corresponding to the face not matching anyface contained in the second face data.
 8. The method according to claim2, wherein establishing the mapping relation between the first facegroup contained in the first image data and the second face groupcontained in the second image data according to the storage typecomprises: when the image has the storage type of only storing in theanother device, determining whether a second face group corresponding toa face contained in second face data of the image has a mappingrelation; and when the second face group corresponding to the facecontained in the second face data of the image has the mapping relation,maintaining the mapping relation; and when the second face groupcorresponding to the face contained in the second face data of the imagehas no mapping relation, creating a new face group in the local deviceand establishing a mapping relation between the second face groupcorresponding to the face contained in the second face data of the imageand the new face group.
 9. The method according to claim 2, whereinestablishing the mapping relation between the first face group containedin the first image data and the second face group contained in thesecond image data according to the storage type comprises: when theimage has the storage type of only storing in the local device,reserving a first face group corresponding to a face contained in firstface data of the image.
 10. The method according to claim 1, whereincomparing the first image data with the second image data to determinethe storage type of the image contained in the first image datacomprises: comparing a first storage path of the image contained in thefirst image data with each second storage path contained in the secondimage data; when a second storage path is identical to the first storagepath, determining the storage type of the image as both storing in thelocal device and storing in the another device; and when no secondstorage path is identical to the first storage path, determining thestorage type of the image as only storing in the local device.
 11. Themethod according to claim 1, wherein comparing the first image data withthe second image data to determine the storage type of the imagecontained in the second image data comprises: comparing each storagepath contained in the first image data with a second storage path of theimage contained in the second image data; when a first storage path isidentical to the second storage path, determining the storage type ofthe image as both storing in the local device and storing in the anotherdevice; and when no first storage path is identical to the secondstorage path, determining the storage type of the image as only storingin the another device.
 12. The method according to claim 1, whereincomparing the first image data with the second image data to determinethe storage type of the image contained in the first image datacomprises: comparing a first message digest of the image contained inthe first image data with each second message digest contained in thesecond image data; when a second message digest is identical to thefirst message digest and, determining the storage type of the image asboth storing in the local device and storing in the another device; andwhen no second message digest is identical to the first message digest,determining the storage type of the image as only storing in the localdevice.
 13. The method according to claim 1, wherein comparing the firstimage data with the second image data to determine the storage type ofthe image contained in the second image data comprises: comparing asecond message digest of the image contained in the second image datawith each first message digest contained in the first image data; when afirst message digest is identical to the second message digest and,determining the storage type of the image as both storing in the localdevice and storing in the another device; and when no first messagedigest is identical to the second message digest, determining thestorage type of the image as only storing in the another device.
 14. Anelectronic device, comprising a memory and a processor, wherein thememory is configured to store computer programs that, when executed bythe processor, cause the processor to implement the method, comprising:acquiring first image data of images stored in a local device and secondimage data of images stored in another device; comparing the first imagedata with the second image data to determine a storage type of an imagecontained in the first image data and/or contained in the second imagedata, the storage type comprising at least one of: both storing in thelocal device and storing in the another device, only storing in thelocal device, and only storing in the another device; establishing amapping relation between a first face group contained in the first imagedata and a second face group contained in the second image dataaccording to the storage type; and processing the first image data andthe second image data with regard to the first face group and the secondface group having the mapping relation with each other.
 15. Theelectronic device according to claim 14, wherein the first image datacontains first face data of an image stored in the local device and thefirst face group corresponding to a face contained in the first facedata, the second image data contains second face data of an image storedin the another device and the second face group corresponding to a facecontained in the second face data; establishing the mapping relationbetween the first face group contained in the first image data and thesecond face group contained in the second image data according to thestorage type comprises: when the image has the storage type of bothstoring in the local device and storing in the another device, matchingthe first face data of the image with the second face data of the image;and when the first face data of the image and the second face data ofthe image contain a same face, mapping a second face group correspondingto the same face to a first face group corresponding to the same face.16. The electronic device according to claim 15, wherein mapping thesecond face group corresponding to the same face to the first face groupcorresponding to the same face comprises: detecting whether the firstface group corresponding to the same face has a mapping relation; and inresponse to detecting that the first face group corresponding to thesame face has no mapping relation, establishing a mapping relationbetween the first face group corresponding to the same face and thesecond face group corresponding to the same face.
 17. The electronicdevice according to claim 16, wherein the method further comprises: inresponse to detecting that the first face group corresponding to thesame face has the mapping relation, determining whether a second facegroup having the mapping relation with the first face groupcorresponding to the same face is consistent with the second face groupcorresponding to the same face; and when the second face group havingthe mapping relation with the first face group corresponding to the sameface is consistent with the second face group corresponding to the sameface, maintaining the mapping relation.
 18. The electronic deviceaccording to claim 17, wherein the method further comprises: when thesecond face group having the mapping relation with the first face groupcorresponding to the same face is inconsistent with the second facegroup corresponding to the same face, creating a new face group in thelocal device; and establishing a mapping relation between the secondface group corresponding to the same face and the new face group. 19.The electronic device according to claim 15, wherein the method furthercomprises: when the second face data of the image contains a face notmatching any face contained in the first face data of the image,determining whether a second face group corresponding to the face notmatching any face contained in the first face data has a mappingrelation; when the second face group corresponding to the face notmatching any face contained in the first face data has the mappingrelation, maintaining the mapping relation; and when the second facegroup corresponding to the face not matching any face contained in thefirst face data has no mapping relation, creating a new face group inthe local device and establishing a mapping relation between the secondface group corresponding to the face not matching any face contained inthe first face data and the new face group.
 20. A non-transitorycomputer-readable storage medium, stored with computer programs that,when executed by a processor, cause the processor to implement themethod, comprising: acquiring first image data of images stored in alocal device and second image data of images stored in another device;comparing the first image data with the second image data to determine astorage type of an image contained in the first image data and/orcontained in the second image data, the storage type comprising at leastone of: both storing in the local device and storing in the anotherdevice, only storing in the local device, and only storing in theanother device; establishing a mapping relation between a first facegroup contained in the first image data and a second face groupcontained in the second image data according to the storage type; andprocessing the first image data and the second image data with regard tothe first face group and the second face group having the mappingrelation with each other.